package at.fhj.ase.data;

import java.io.File;

/**
 * 
 * @author Zandmiralvand, Jaklitsch, Mansouri
 *
 */
public class LogLineInformation {
	private String content;
	private int lineNumber;
	/////////////FileName DataType will be changed////////////
	private File fileName;	
	
//public LogLine(){};
	public LogLineInformation(String content, int lineNumber, File fileName) {
		setContent(content);
		//this.lineNumber = lineNumber;
		setLineNumber(lineNumber);
		setFileName(fileName);
	}

	/**
	 * 
	 * @param logLineToCopy
	 * 
	 * copy constructor, allows to create a deep copy of this object
	 * to avoid, that the original object can be modified from outside
	 */
	public LogLineInformation(LogLineInformation logLineToCopy) {
		this(logLineToCopy.getContent(), logLineToCopy.getLineNumber(),
				logLineToCopy.getFileName());
	}
	
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		if (content == null)
			throw new IllegalArgumentException("content may not be null");
		this.content = content;
		System.out.println("\n" +"LOG CONTENT : "+ content);
	}
	public int getLineNumber() {
		return lineNumber;
	}
	public void setLineNumber(int lineNumber) {
		this.lineNumber = lineNumber;
		System.out.println("\n" +"LINE NUMBER: "+ lineNumber);
	}
	///////////////////fileName DataType is changed/////////////////
	public File getFileName() {
		return fileName;
	}
	public void setFileName(File fileName2) {
		if (fileName2 == null)
			throw new IllegalArgumentException("file name may not be null");
		this.fileName = fileName2;
		System.out.println("\n" + "FILE PATH: "+ fileName);
	}
}
